package com.gun3y;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gun3y.entity.Wrapper;
import com.gun3y.entity.result.ResultField;
import com.gun3y.extractor.HtmlExtractor;
import com.gun3y.http.HttpConnector;

@Service
public class SWService {

    @Autowired
    HttpConnector httpConnector;

    @Autowired
    HtmlExtractor htmlExtractor;

    public List<ResultField> retrieve(Wrapper wrapper, String url) {

	String html = httpConnector.get(url);

	return htmlExtractor.extract(wrapper, html);
    }
}
